﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using L2Tools.L2l2.Properties;
using L2Tools.Model;

namespace L2Tools.L2l2.View
{
    public partial class Main : Form
    {
        #region Attribute
        private L2l2Manager manager;
        #endregion
        public Main()
        {
            InitializeComponent();
            manager = new L2l2Manager();
            manager.Show();
        }

        private void notifyIcon1_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            if (manager.IsDisposed)
            {
                manager = new L2l2Manager();
                manager.Show();
            }
            else if(!manager.Visible)
            {
                manager.Visible = true;
                if (manager.WindowState == FormWindowState.Minimized)
                {
                    manager.WindowState = FormWindowState.Normal;
                }
            }
            manager.Activate();
        }
    }
}
